var re = /^\d{3}\-\d{3,8}$/;
re.test('010-12345');

'a,b;; c  d'.split(/[\s\,\;]+/);

//greedy
var re = /^(\d+)(0*)$/;
re.exec('102300'); // ['102300', '102300', '']